<!DOCTYPE html>
<html>
<head>
  <title>商品详情</title>
  <meta charset="utf-8">
  <link rel="stylesheet" type="text/css" href="./css/css_reset.css"/>
  <link rel="stylesheet" type="text/css" href="./css/goods_detail.css"/>
  <link rel="stylesheet" type="text/css" href="./css/jquery.spinner.css" />
</head>
<body>
<div class="wrapper">
  <iframe src="./common/head.html" frameborder="0" width="1260px" height="80px" scrolling="no" name="frame3" ></iframe>
  <div id="DB_gallery">
    <div class="DB_imgSet">
      <div class="DB_imgWin enable_edit" >
        <img src="" id="main_img" />
      </div>
      <div class="DB_prevBtn">
        <img src="./src/XueJiJing/prev_off.png" />
      </div>
      <div class="DB_nextBtn">
        <img src="./src/XueJiJing/next_off.png" />
      </div>
    </div>
    <div class="DB_thumSet">
      <ul class="DB_thumMove enable_edit" id="change_img">
        <li>
            <a href="" class="img_1">
            <img src=""  class="img1" />
          </a>
        </li>
        <li>
          <a href="" class="img_2">
            <img src="" class="img2" />
          </a>
        </li>
        <li>
          <a href="" class="img_3">
            <img src="" class="img3" />
          </a>
        </li>
        <li>
          <a href="" class="img_4">
            <img src="" class="img4" />
          </a>
        </li>
      </ul>
      <div class="DB_thumLine"></div>
      <div class="DB_prevPageBtn">
        <img src="./src/XueJiJing/prev_page.png" alt="上一页"/>
      </div>
      <div class="DB_nextPageBtn">
        <img src="./src/XueJiJing/next_page.png" alt="下一页"/>
      </div>
    </div>
  </div>
  <div class="DB_Intro">
    <div class="enable_edit"><span class="span1 goods_name">KOSE高丝雪肌精乳液140ml (保湿 美白 精华液 乳液)</span></div>
    <br/>
    <a href="#" class="a1" >
      【2件9.5折】 华工自营
      <span style="color:#4F5EBA;text-decoration:underline;">SKII全场1000减200，22日全部产品恢复市场价销售，最后的疯狂！</span>
    </a>
    <br/>
     <div class="enable_edit"><a href="#" class="a2">
      华工价：
      <span style="color: red;font-size: 20px;">¥</span>
      <span style="color: red;font-size: 20px;" class="price"></span></div>

    </a>
    <br/>
    <a href="#" class="a3">
      促销信息：
      <span style="color: red;">满1000减200</span>
      &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp详情>>
    </a>
    <div class="div1">
      <div style="margin-top:15px;margin-left:50px;">
        <a href="#" style="color:#B5B5B5;font-weight: bold;">
          月销量
          <span style="color:red;">108</span>
        </a>
        <span style="margin-left:40px;" style="color:#B5B5B5;">|</span>
        <a href="#" style="margin-left:40px;color:#B5B5B5;font-weight: bold;">
          累计评价
          <span style="color:red;">540</span>
        </a>
        <span style="margin-left:40px;"style="color:#B5B5B5;">|</span>
        <a href="#"style="margin-left:40px;color:#B5B5B5;font-weight: bold;">
          送商城积分
          <span style="color:green;">152</span>
        </a>
      </div>
    </div>
    <a href="#" class="a4">
      运费&nbsp&nbsp日本 至 广州&nbsp&nbspEMS运费:不超过1kg 95元;不超过2kg 160元&nbsp&nbsp&nbsp详情>>
    </a>
    <a href="#" class="a5">数量</a>
    <input type="text" class="spinnerExample" style="position:absolute;top:298px;left:124px;" id="purchase_number" />
    <div style="margin-top:30px;margin-left:180px;" id="put_in_car_button">
      <a href="#" >
        <img src="./src/GouWu_Images/GouWuChe.png">
      </a>
    </div>
    <div style="margin-top:20px;margin-left:45px;">
      <img src="./src/GouWu_Images/15tian.png"></div>
    <div style="margin-top:15px;margin-left:50px;">
      <a href="#" class="a6">
      <span>服务承诺  &nbsp正品保证 &nbsp&nbsp按时发货 &nbsp&nbsp极速退款 &nbsp&nbsp赠运费险 &nbsp&nbsp七天无理由退换
      </span>
    </a>
  </div>
  <div style="margin-top:15px;margin-left:50px;float:left;">
    <a href="#" class="a6" >支付方式</a>
  </div>
  <div style="float:left;margin-top:10px;margin-left:17px;">
    <img src="./src/GouWu_Images/Pay.png" ></div>
</div>
<div class="content">
  <div class="content1">
    <div>
      <img src="./src/GouWu_Images/1.png"></div>
    <div style="color:#666666;font-size:15px;padding-left:100px;" class="enable_edit">
    商品名称：<span class="goods_name"></span>
      <span style="margin-left:100px;">商品编号：234482</span>
      <span style="margin-left:100px;">品牌：雪肌精（SEKKISEI）</span>
      <span style="margin-left:100px;">上架时间：2015-10-01 22:45:25</span>
    </div>
    <div style="color:#666666;font-size:15px;padding-left:100px;margin-top:15px;">
      商品毛重：210.00g
      <span style="margin-left:130px;">商品产地：日本</span>
      <span style="margin-left:112px;">人群：所有</span>
      <span style="margin-left:210px;">肤质：所有肤质</span>
    </div>
    <div style="color:#666666;font-size:15px;padding-left:100px;margin-top:15px;" class="enable_edit">
      类别：<span style="margin-left:50px" class="goods_kind"></span>
    </div>
  </div>
  <div class="content2 enable_edit">
    <div>
      <img src="./src/GouWu_Images/2.png" ></div>
    <div class="goods_imge">
      <img src="" style="margin-left:200px;" class="big_img_1"></div>
    <div class="goods_imge">
      <img src="" style="margin-left:214px;" class="big_img_2"></div>
    <div class="goods_imge">
      <img src="" style="margin-left:214px;" class="big_img_3"></div>
  </div>
  <div class="content3">
    <div>
      <img src="./src/GouWu_Images/3.png" style="margin:20px 0 5px 50px;"></div>
    <div style="color:#666666;margin-left:100px;font-size:12px;">华工商城向您保证所售商品均为正品行货，一律开具机打发票或电子发票。</div>
    <div>
      <img src="./src/GouWu_Images/4.png" style="margin:20px 0 5px 52px;"></div>
    <div style="color:#666666;margin-left:100px;font-size:12px;line-height:2;">
      凭质保证书及商城发票，可享受全国联保服务，与您亲临商场选购的商品享受相同的质量保证。华工商城还为您提供具有竞争力的商品价格和运费政策，请您放心购买！
      <br/>
      <br/>
      注：因日本厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件，本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货！并且保证与当时市场上同样
      <br/>
      主流新品一致。若本商城没有及时更新，请大家谅解！
    </div>
    <div>
      <img src="./src/GouWu_Images/5.png" style="margin:20px 0 5px 56px;"></div>
    <div style="color:#666666;margin-left:100px;font-size:12px;">
      客户购买商品7日内（含7日，自客户收到商品之日起计算），在保证商品完好的前提下，可无理由退货。（部分商品除外，详情请见各商品细则）
    </div>
    <div style="margin-left:20px;margin-top:30px;">
      <img src="./src/GouWu_Images/foot.png"></div>
  </div>
 <iframe src="./common/foot.html" frameborder="0" width="1260px" height="340px" scrolling="no" name="frame2" ></iframe>
</div>
<div class='to-top'>
      <a href="#"><img src="./src/common/top1.png"></a>
</div>
</div>
  <script type="text/javascript" charset="utf-8" src="./js/jquery-1.11.3.min.js"></script>
  <script type="text/javascript" src="./js/query-1.7.1.min.js"></script>
  <script type="text/javascript" src="./js/jquery.DB_gallery.js"></script>
  <script type="text/javascript">
    $('#DB_gallery').DB_gallery({
      thumWidth:110,            
      thumGap:8,                
      thumMoveStep:4,           
      moveSpeed:300,            
      fadeSpeed:500            
    });
    </script>
  <script type="text/javascript" src="./js/jquery-1.8.0.min.js"></script>
  <script type="text/javascript" src="./js/jquery.spinner.js"></script>
  <script type="text/javascript">$('.spinnerExample').spinner({});</script>
  <script type="text/javascript">
    $(function() {
      //数据交换
      function getvalue(name) {
        var str = window.location.search; //location.search是从当前URL的?号开始的字符串
        if (str.indexOf(name) != -1) {
          var pos_start = str.indexOf(name) + name.length + 1;
          var pos_end = str.indexOf("&", pos_start);
          if (pos_end == -1) {
            return decodeURIComponent(str.substring(pos_start));
          } else {
            alert("没有此值~~");
          }
        }
      }
      var keyword = getvalue("keyword");
      var jsonData = {
        "keyword": keyword
      }
      $.ajax({
        type: "post",
        url: "./handler/show_info.php",
        dataType: "json",
        data: jsonData,
        success: function(msg) {
          var img1_src = msg.img_folder + msg.objectArray[0].img1;
          var img2_src = msg.img_folder + msg.objectArray[0].img2;
          var img3_src = msg.img_folder + msg.objectArray[0].img3;
          var img4_src = msg.img_folder + msg.objectArray[0].img4;
          var img5_src = msg.img_folder + msg.objectArray[0].img5;
          var img6_src = msg.img_folder + msg.objectArray[0].img6;
          var img7_src = msg.img_folder + msg.objectArray[0].img7;


          $(".enable_edit").find('.price').html(msg.objectArray[0].Price);
          $(".enable_edit").find('.goods_name').html(msg.objectArray[0].Course_Name);
          $(".enable_edit").find('.goods_kind').html(msg.objectArray[0].Kind);
          $(".enable_edit").find('.img1').attr('src',img1_src);
          $(".enable_edit").find('.img2').attr('src',img2_src);
          $(".enable_edit").find('.img3').attr('src',img3_src);
          $(".enable_edit").find('.img4').attr('src',img4_src);
          $(".enable_edit").find('#main_img').attr('src',img1_src);
          
          $(".enable_edit").find('.img_1').attr('href',img1_src);
          $(".enable_edit").find('.img_2').attr('href',img2_src);
          $(".enable_edit").find('.img_3').attr('href',img3_src);
          $(".enable_edit").find('.img_4').attr('href',img4_src);

          $(".enable_edit").find('.big_img_1').attr('src',img5_src);
          $(".enable_edit").find('.big_img_2').attr('src',img6_src);
          $(".enable_edit").find('.big_img_3').attr('src',img7_src);              
        }
      });

      //to-top
      $(window).on("scroll",function(){
          if($(window).scrollTop()>350){
            $(".to-top").show();
          }else{
            $(".to-top").hide();
          }
        })
        $(".to-top").on("mouseenter",function(){
          $(this).find("img").attr("src","./src/common/top2.png");
        })
        $(".to-top").on("mouseleave",function(){
          $(this).find("img").attr("src","./src/common/top1.png");
        })

        //加入购物车

        $("#put_in_car_button").click(function(){
           var purchase_number = $("#purchase_number").val();
           var goods_img_src = getvalue("keyword");
           // var img_name = goods_name.substring(16);
           location.href="./shoppingcar.html?goods_img_src="+encodeURIComponent(goods_img_src)+'&purchase_number='+encodeURIComponent(purchase_number);
        })

    })
  </script>

</body>
</html>
